Part Number Hot Search : 
TLE4207 MAX11600 742W1520 H11AA2 HN1B01F MAX15 IDT71124 FR105
Product Description
Full Text Search
 

To Download AN975 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  AN975/0600 1/11 AN975 application note upgrading from st625x/6xb to st625x/6xc by microcontroller application team introduction as part of a process of continuous improvement, stmicroelectronics has replaced all st62t5xb and st62t6xb devices by st62t5xc and st62t6xc. this opportunity was taken to include new features such as the low voltage detector (lvd) for safe reset, the oscillator safeguard (osg) and a new rc oscillator. this application note details these new features and draws attention to some precautions that it is mandatory to take when upgrading an application developed with b revision to c revision devices. the first part of the document is related to the silicon itself and the second one to the development tools. 1
2/11 upgrading from st625x/6xb to st625x/6xc 1 silicon changes 1.1 new features 1.1.1 low voltage detector (lvd) st625x/6xc now features an on-chip low voltage detector which is enabled by setting a bit in the option bytes (refer to the option bytes section in the device data sheet). the lvd allows the device to be used without any external reset circuitry. in this case, the reset pin should be left unconnected . when the lvd is not activated, an external circuit is mandatory to ensure correct power on reset operation. for more details, please refer to the application note an669. the lvd generates a static reset when the supply voltage is below a reference value. this means that it secures the power-up as well as the power-down keeping the st6 in reset. the v it- reference value for a voltage drop is lower than the v it+ reference value for power-on in order to avoid a parasitic reset when the mcu starts running and sinks current on the supply (hysteresis). the lvd reset circuitry generates a reset when v dd is below: C v it+ when v dd is rising C v it- when v dd is falling the lvd function is illustrated in figure 1. if the lvd is enabled, the mcu can be in only one of two states: C over the input threshold voltage, it is running under full software control C below the input threshold voltage, it is in static safe reset in these conditions, secure operation is guaranteed without the need for external reset hard- ware. during a low voltage detector reset, the reset pin is held low, thus permitting the mcu to reset other devices. 2
3/11 upgrading from st625x/6xb to st625x/6xc figure 1. low voltage detector reset 1.1.2 oscillator safeguard (osg) the oscillator safeguard (osg) feature is a means of dramatically improving the operational integrity of the mcu.the osg function is enabled by setting the osg option bit in the option byte (refer to the option bytes section in the device data sheet). the osg acts as a filter whose cross-over frequency is device dependent and provides three basic functions: C filtering spikes on the oscillator lines which would result in driving the cpu at excessive fre- quencies C management of the low frequency auxiliary oscillator (lfao), (useable as low cost internal clock source, backup clock in case of main oscillator failure or for low power consumption) C automatically limiting the f int clock frequency as a function of supply voltage, to ensure cor- rect operation even if the power supply drops. the osg function is illustrated in figure 2. for more details on it, please refer to the clock, supply and reset section in the device data sheet. please note that the osg should be used wherever possible as it provides maximum security for the application. it should be noted however, that it can increase power consumption and re- duce the maximum operating frequency to f osg (refer to the electrical characteristics section of the device data sheet). caution: care has to be taken when using the osg, as the internal frequency is defined be- tween a minimum and a maximum value and may vary depending on both v dd and tempera- ture. for precise timing measurements, it is not recommended to use the osg. v dd v it+ reset v it- v hyst
4/11 upgrading from st625x/6xb to st625x/6xc figure 2. osg filtering function 1.1.2.1 low frequency auxiliary oscillator (lfao) the low frequency auxiliary oscillator has three main purposes. firstly, it can be used to re- duce power consumption in non timing critical routines. secondly, it offers a fully integrated system clock, without any external components. lastly, it acts as a backup oscillator in case of main oscillator failure. this oscillator is available when the osg option is selected in the option byte. in this case, it automatically starts one of its periods after the first missing edge of the main oscillator, what- ever the reason for the failure (main oscillator defective, no clock circuitry provided, main os- cillator switched off...). see figure 3. please note that the a/d converter accuracy is decreased, since the internal frequency is below 1.2 mhz. figure 3. lfao oscillator function f osc f osg f int f osc< f osg f osc> f osg main oscillator stops main oscillator restarts internal clock driven by lfao f osc f int f lfao
5/11 upgrading from st625x/6xb to st625x/6xc 1.2 compatibility issues and recommendations 1.2.1 eeprom st625x/6xc have been designed to ensure data eeprom integrity as long as the applica- tion designer follows the guidelines described in application note an671. in general, eeprom data corruption occurs whenever the reset signal is not well controlled when the power supply goes either up or down. this is particularly true with a slow power supply ramp-up and/or fall time, since the device may be in a supply voltage range where its functionality is not guaranteed. if the device is not kept in reset state during both the power up or down sequence then the microcontroller core may start writing to the eeprom. to avoid eeprom data corruption, it is therefore highly recommended to disable the eeprom when it is not used. note that the eeprom is automatically enabled on reset (eectl reset state = 00h). it is also possible to prevent unwanted eeprom write accesses by enabling the on-chip lvd which will reset the st6 when the voltage is out of the device operating range. caution: when writing parallel data (e2par2 bit set), the eeprom page must not be changed (no access to the drbr register is allowed). 1.2.2 i/o ports this section gives some important recommendations on using i/o ports. these recommenda- tions also apply to b devices but are even more important for c devices. C do not use single-bit instructions on port data registers. C configure the i/o ports following the safe i/o state switching sequence. 1.2.2.1 instructions not to be used to access port data registers (set, res, inc and dec) do not use single-bit instructions (set, res, inc and dec) on port data registers if any pin of the port is configured in input mode. these instructions make an implicit read and write back of the entire register. in port input mode, however, the data register reads from the input pins directly, and not from the data reg- ister latches. since data register information in input mode is used to set the characteristics of the input pin (interrupt, pull-up, analog input), these may be unintentionally reprogrammed de- pending on the state of the input pins. as a general rule, it is better to only use single bit instructions on data registers when the whole (8-bit) port is in output mode. in the case of inputs or of mixed inputs and outputs, it is advisable to keep a copy of the data register in ram. single bit instructions may then be used on the ram copy, after which the whole copy register can be written to the port data register:
6/11 upgrading from st625x/6xb to st625x/6xc set bit, datacopy ld a, datacopy ld dra, a 1.2.2.2 safe i/o state switching sequence switching the i/o ports from one state to another should be done in a sequence which ensures that no unwanted side-effects can occur. the recommended safe transitions are illustrated in figure 4. all other transitions are potentially risky and should be avoided when changing the i/o operating mode. figure 4. diagram showing safe i/o state transitions 1.2.2.3 handling unused port bits on ports that have less than 8 external pins connected: C leave the bits related to the unbonded pins in reset state and do not change their configu- ration. C do not use instructions that act on a whole port register (inc, dec, or read operations). un- available bits must be masked by software (and instruction). thus, when a read operation performed on an incomplete port is followed by a comparison, use a mask. 1.2.3 8-bit timer on c revision devices, in order to use the 8-bit timer in gated mode, the pc1/tim1 pin has to be configured in input mode either with or without pull-up through the port c ddr, or and dr registers. on b revision devices, it was possible to define pc1/tim1 pin as output in this mode. but on c revision devices, if this pin is configured as output, the schmitt trigger input is disabled and the timer will therefore not work properly. interrupt pull-up output open drain output push-pull input pull-up (reset state) input analog output open drain output push-pull input 010* 000 100 110 011 001 101 111
7/11 upgrading from st625x/6xb to st625x/6xc 1.2.4 spi when the spi is used in master mode, the sck pin (pc4) and sout pin (pc3) work in output mode and the sin pin (pc2) in input mode. on st625x/6xc, the port c pins used for the spi have to be configured in input mode either with or without pull-up. their reset configuration doesnt have to be changed. to enable the spi in master mode, the spclk bit in the spi mode control register has to be set. by setting this bit, the sck pin (pc4) is automatically configured in output push-pull mode and the clock is output at the frequency configured in the spidiv register. the output of the spi data register sout pin (pc3) is also automatically configured in output push-pull by setting bit 0 in the miscr register. the following is a software example of how to use the spi in master mode: .org 080h (or cseg at 080h depending on the toolchain) reset: clr x clr a reti ; exit nmi mode ldi wdgr, watchtim ; load the watchdog ldi oscr, 00h ; set the oscillator ratio to 1 ldi ddrc, 00h ; port c in reset state ldi orc, 00h ldi drc, 00h ldi miscr, 001h ; enable sout ; (pc3 is configured in output push-pull) ldi spidiv, 048h ; clock ratio = 1 / 9 bits frame ldi spimod, 03eh ; cpol = 0 / filters enabled / spclk = 1 / cpha = 1 ; spstrt = 1 / spin = 1 / spie = 0 ; (pc4 is configured as output push-pull) ldi spidr, 0aah ; load the data to be send set 7, spimod ; enable the transmission (spirun = 1) loop: jrs 7, spimod, loop ; poll the bit spirun for end of transmission .....
8/11 upgrading from st625x/6xb to st625x/6xc 1.2.5 adc when an i/o pin is used as an analog input, a/d conversion accuracy will be impaired if neg- ative current injections (v inj < v ss ) occur from adjacent i/o pins with analog input capability. st625x/6xc devices are more sensitive to this phenomenon than st625x/6xb devices. in the case of a loss of accuracy, we recommend to (refer to figure 5.): C use another i/o port located further away from the analog pin, preferably not multiplexed on the a/d converter C increase the input resistance r in j (to reduce the current injections) and reduce r adc (to preserve conversion accuracy). figure 5. leakage from digital inputs 1.2.6 oscr register on c revision devices, bit 3 of the oscr register must be set to 0 in order to achieve low con- sumption. on b revision devices, it was mandatory to set it to 1. 1.2.7 tromin input signal the pb3/tromin input signal on st625x/6xc devices for serial programming has been in- verted. this has to be taken into account if the user has implemented his own programming algorithm and does not use stmicroelectronics or third party programming tools. pby/ainy pbx/ainx r adc leakage current if v inj < v ss a/d i/o port (digital i/o) r inj converter digital input analog input v ain v inj
9/11 upgrading from st625x/6xb to st625x/6xc 2 development tools the information given in this section applies only to st development tools. for information on third party tools, please contact your supplier. 2.1 starter kit some communication problems have been encountered when programming st625x/6xc de- vices with the old st626x starter kit (mb080 board). if, during the programming phase, the message cannot communicate with the device" is displayed, first check the parallel cable and jumper settings. if everything is correct, we then recommend to replace the u2 chip (74hc125) by a 74ls125 which has better thresholds. to program st625x/6xc devices we also advise to use the latest version of the st626x starter kit (mb196 board) (which can be easily distinguished from the old one as it has 2 sockets for programming dip16/20/28 devices). the order code of the new starter kit is st626xc-kit. 2.2 hds2 emulator series the st626x-emu2 emulator can be used to emulate st625x/6xc devices without any mod- ification. however, new features such as the lvd, osg, lfao are only emulated on the new st62gp-emu2 emulator. 2.3 eprom programming board in order to program st625x/6xc devices, the st62e6xb eprom programming board firmware has been updated. the revision level is identified by a sticker on the main ic on the board. the marking must be 310-32 or higher. if the board has an earlier revision level, contact your local distributor or st sales office to order an upgrade or a new epb (order code st626xc-epb). 2.4 gang programmer like the epb, the firmware of the gang programmer has been updated. the marking on the chip must be at least 623-30. if the programmer has an earlier revision level, contact your local distributor or st sales office to order an upgrade or a new gang programmer.
10/11 upgrading from st625x/6xb to st625x/6xc 2.5 windows epromer to program st625x/6xc devices, it is mandatory to use the windows epromer v3.2 or above. the latest version available can be downloaded from our web site at the address: http://mcu.st.com.
11/11 upgrading from st625x/6xb to st625x/6xc "the present note which is for guidance only aims at providing customers with information regarding their products in order for them to save time. as a result, stmicroelectronics shall not be held liable for any direct, indirect or consequential damages with respect to any claims arising from the content of such a note and/or the use made by customers of the information contained herein in connexion with their products." information furnished is believed to be accurate and reliable. however, stmicroelectronics assumes no responsibility for the co nsequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. no license is granted by implication or otherwise under any patent or patent rights of stmicroelectronics. specifications mentioned in this publicati on are subject to change without notice. this publication supersedes and replaces all information previously supplied. stmicroelectronics prod ucts are not authorized for use as critical components in life support devices or systems without the express written approval of stmicroele ctronics. the st logo is a registered trademark of stmicroelectronics ? 2000 stmicroelectronics - all rights reserved. purchase of i 2 c components by stmicroelectronics conveys a license under the philips i 2 c patent. rights to use these components in an i 2 c system is granted provided that the system conforms to the i 2 c standard specification as defined by philips. stmicroelectronics group of companies australia - brazil - china - finland - france - germany - hong kong - india - italy - japan - malaysia - malta - morocco - sin gapore - spain sweden - switzerland - united kingdom - u.s.a. http://www.st.com


▲Up To Search▲   

 
Price & Availability of AN975

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X